home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hunter 2006
/
Hunter 2006.iso
/
soft
/
sleipnir241.exe
/
{app}
/
scripts
/
ƒŠƒ“ƒNˆ—
/
‚¿‚傱‚Á‚Æ‹§ƒŠƒ“ƒN.js
next >
Wrap
Text File
|
2006-06-15
|
8KB
|
206 lines
/*==========================================================
Script by jin-ren
ü@é┐éσé▒é┴é╞ï¡ÉºâèâôâN
ü@Original é┐éσé▒é┴é╞ï¡ÉºâèâôâN ver.1.09ü{â┐
ü@êΩăözòzî│üiéΘé─é±é╠é¿òöë«üFhttp://www2s.biglobe.ne.jp/~yanai/üj
ü@Æÿì∞îáü^û╞É╙ü^ô]ì┌é╔è╓é╡é─
ü@û{âXâNâèâvâgé╔è╓é╖éΘâ\âtâgâEâFâAïyé╤âfü[â^é╠Æÿì∞îáé═æSé─üAêΩÄ₧özòzî│é┼éáéΘüA
ü@üuâNâìâmâXüEâNâëâEâôüvé╠è╟ù¥Él"û÷êΣ É¡ÿaühé│é±é╔éáéΦé▄é╖üB
ü@é▒é╠âXâNâèâvâgé═û÷êΣé│é±é╠âIâèâWâiâïé≡î│é╔jin-rené¬SleipnirâAâhâîâXâüâjâàü[ègÆúùpé╔ëⁿò╥é╡é─éáéΦé▄é╖üB
ü@é▒é╠âXâNâèâvâgé╔éµéΘòsï∩ìçôÖé═û÷êΣé│é±ê╢é┼é═é╚é¡üAÄäjin-rené▄é┼é▓ÿAùìë║é│éóüB
2002/09/08
==========================================================*/
var obj, document, id;
obj = new ActiveXObject("Sleipnir.API");
id = obj.GetDocumentID(obj.ActiveIndex);
obj_doc = obj.GetDocumentObject(id); // âIâuâWâFâNâgé╠âhâLâàâüâôâg
if (obj_doc == null){
obj.MessageBox("Document é≡ì∞ɼé┼é½é▄é╣é±");
} else {
/***** ò╧Éöé╠Åëè·ë╗ ============================================= *****/
//
sel_obj = obj_doc.selection.createRange(); // æIæ≡ö═ê═
/***** ò¬è≥Åêù¥ ================================================ *****/
//
type = "all";
if ( sel_obj == null || sel_obj.htmlText == "" ) {
/***** æIæ≡ö═ê═é¬é╚éóÅΩìç =============================== *****/
//
rep_data = obj_doc.body.innerHTML; // âyü[âWæSæ╠
type = "all";
} else {
/***** æIæ≡ö═ê═é¬éáéΘÅΩìç =============================== *****/
//
rep_data = sel_obj.htmlText; // æIæ≡ö═ê═é╠âeâLâXâgé≡ò\Ī
type = "sel";
}
/***** IEâoâOæ╬ì⌠ =============================================== *****/
//
re = new RegExp( "<[^>]*><[^>]*>", "ig" );
target = rep_data.match( re );
if ( target != null ) {
if ( target.length == 1 && target[0] == rep_data ) {
/***** æIæ≡ö═ê═é¬é╚éóüiï≤üjÅΩìç ================= *****/
//
rep_data = obj_doc.body.innerHTML; // âyü[âWæSæ╠
type = "all";
}
}
rep_data = " " + rep_data; // ɵô¬æ╬ì⌠
/***** Yahoo!âoâOæ╬ì⌠ =========================================== *****/
//
re = new RegExp( "[\?]http://w", "g" );
rep_data = rep_data.replace( re, "esc_q_h_cw_esc" );
re = new RegExp( "[\?]http://", "g" );
rep_data = rep_data.replace( re, "esc_q_h_c_esc" );
re = new RegExp( "=http://w", "g" );
rep_data = rep_data.replace( re, "esc_e_h_cw_esc" );
re = new RegExp( "=http://", "g" );
rep_data = rep_data.replace( re, "esc_e_h_c_esc" );
re = new RegExp( "[\*]http://w", "g" );
rep_data = rep_data.replace( re, "esc_a_h_cw_esc" );
re = new RegExp( "[\*]http://", "g" );
rep_data = rep_data.replace( re, "esc_a_h_c_esc" );
/***** âvâìâgâRâïé╚é╡òΓÉ│ ======================================= *****/
//
re = new RegExp( "([^:üF][^/ü^]{1,2})([wéù][wéù][wéù][^.üD]*[.üD][^/ü^]+[/ü^])", "ig" );
rep_data = rep_data.replace( re, function( str, p1, p2 ){return p1 + "http://" + p2;} );
re = new RegExp( "([^:üF][^/ü^]{1,2})([héê][oéÅ][méì][^.üD]*[.üD][^/ü^]+[/ü^])", "ig" );
rep_data = rep_data.replace( re, function( str, p1, p2 ){return p1 + "http://" + p2;} );
/***** Æuè╖ÅÇö⌡ ================================================= *****/
//
re = new RegExp( "([éO-éÜüD-ü`ü|0-z.-~\-]+)([üF:][ü^/])([éO-éÜüD-ü`ü|0-z.-~\-]+)", "ig" );
sabun = "éü".charCodeAt(0) - "a".charCodeAt(0);
rng0a = "éO".charCodeAt(0);
rng0b = "éÜ".charCodeAt(0);
rng1a = "üD".charCodeAt(0);
rng1b = "ü`".charCodeAt(0);
rng2 = "ü|".charCodeAt(0);
rep_data = rep_data.replace( re, function( str, p1, p2, p3 ){
i_size = p1.length; new_str1 = "";
for ( i = 0; i < i_size; i ++ ) {
charc = p1.charCodeAt(i)
if ( ( rng0a <= charc && charc <= rng0b ) || ( rng1a <= charc && charc <= rng1b ) || ( charc == rng2 ) ) {
new_str1 += String.fromCharCode( charc - sabun ) ;
} else {
new_str1 += String.fromCharCode( charc ) ;
}
}
i_size = p3.length; new_str3 = "";
for ( i = 0; i < i_size; i ++ ) {
charc = p3.charCodeAt(i)
if ( ( rng0a <= charc && charc <= rng0b ) || ( rng1a <= charc && charc <= rng1b ) || ( charc == rng2 ) ) {
new_str3 += String.fromCharCode( charc - sabun ) ;
} else {
new_str3 += String.fromCharCode( charc ) ;
}
}
return new_str1 + ":/" + new_str3;
} );
/***** è╘êßéªâèâôâNæ╬ì⌠ ========================================= *****/
//
re = new RegExp( "hp:/", "ig" );
rep_data = rep_data.replace( re, "http:/" );
re = new RegExp( "htp:/", "ig" );
rep_data = rep_data.replace( re, "http:/" );
re = new RegExp( "(http:/)([0-z])", "ig" );
rep_data = rep_data.replace( re, function( str, p1, p2 ){return p1 + "/" + p2;} );
/***** ö╝Æ[âèâôâNæ╬ì⌠ =========================================== *****/
//
re = new RegExp( "([^h])(ttp://)", "ig" );
rep_data = rep_data.replace( re, function( str, p1, p2 ){return p1 + "h" + p2;} );
re = new RegExp( "([^t])(tp://)", "ig" );
rep_data = rep_data.replace( re, function( str, p1, p2 ){return p1 + "ht" + p2;} );
re = new RegExp( "([^t])(p://)", "ig" );
rep_data = rep_data.replace( re, function( str, p1, p2 ){return p1 + "htt" + p2;} );
/***** Æuè╖ ===================================================== *****/
//
re = new RegExp( "([^\"'=])(http://)([^éƒ-é±â@-âûêƒ-ⁿKüz-üi <\"ü@\n\t\(\)]*)", "ig" );
rep_data = rep_data.replace( re, function( str, p1, p2, p3 ){
return ( p1 + '<A href="' + p2 + p3 + '">' + p2 + p3 + '</A>' );
} );
re = new RegExp( "(<A [^>]*>)(<A [^>]*>)", "ig" );
rep_data = rep_data.replace( re, function( str, p1, p2 ){ return p1; } );
re = new RegExp( "</A></A>", "ig" );
rep_data = rep_data.replace( re, "</A>" );
rep_data = rep_data.substr( 1 ); // ɵô¬æ╬ì⌠
/***** Yahoo!âoâOæ╬ì⌠ =========================================== *****/
//
re = new RegExp( "esc_q_h_c_esc", "g" );
rep_data = rep_data.replace( re, "?http://" );
re = new RegExp( "esc_q_h_cw_esc", "g" );
rep_data = rep_data.replace( re, "?http://w" );
re = new RegExp( "esc_e_h_c_esc", "g" );
rep_data = rep_data.replace( re, "=http://" );
re = new RegExp( "esc_e_h_cw_esc", "g" );
rep_data = rep_data.replace( re, "=http://w" );
re = new RegExp( "esc_a_h_c_esc", "g" );
rep_data = rep_data.replace( re, "*http://" );
re = new RegExp( "esc_a_h_cw_esc", "g" );
rep_data = rep_data.replace( re, "*http://w" );
/***** ö╜ëf ===================================================== *****/
//
if ( type == "sel" ) {
/***** æIæ≡ö═ê═é¬éáéΘÅΩìç =============================== *****/
//
arr = obj_doc.body.innerHTML.split( sel_obj.htmlText );
if ( arr.length > 1 ) {
obj_doc.body.innerHTML = arr.join( rep_data );
} else {
dd = new Date();
dd_str = dd.getTime()
dd_str = String( dd_str );
new_win = obj.window.open( "", dd_str, "" );
nd = new_win.document;
nd.writeln('<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=Shift_JIS">');
nd.writeln('<!-- éá(MOJIBAKE TAISAKU) -->');
nd.writeln('<html><head><title>é┐éσé▒é┴é╞ ï¡ÉºâèâôâN</title>');
nd.writeln('</head>');
nd.writeln('<BODY BGCOLOR="white" TEXT="black">');
nd.writeln('<B>æIæ≡ö═ê═û▀é╡Ä╕ösÄ₧</B><SMALL><BR>üiæIæ≡ö═ê═é╔éµé┴é─é═éñé▄é¡ö╜ëfé┼é½é╕é╔ò╩âEâBâôâhâEò\Īé╞é╚éΦé▄é╖üj<BR>üiò╧è╖é╖éΘæ╬Å█é¬é╚éóÅΩìçéαé▒é╠âEâBâôâhâEé═èJé½é▄é╖üj</SMALL><P>');
nd.write( rep_data );
nd.writeln('</BODY></HTML>');
}
obj_doc.selection.empty(); // æIæ≡ë≡Å£
} else {
/***** æIæ≡ö═ê═é¬é╚éóÅΩìç =============================== *****/
//
obj_doc.body.innerHTML = rep_data; // âyü[âWæSæ╠
}
}
obj.beep();
obj = null